﻿using Shipwar.SDK;
using Network;

public class ProcSDK : Proc
{
    public ProcSDK()
        : base(ProcType.PROC_SDK)
    {

    }

    public override void process()
    {

    }

    public override void onBegin(object[] param)
    {
        SDK.GetInstance().onLoginFinishEvent += onLoginFinish;
        SDK.GetInstance().StartLogin();
        IsInit = true;
    }

    public override void onEnd()
    {
        SDK.GetInstance().onLoginFinishEvent -= onLoginFinish;
    }

    public override void onTcpDisconnected()
    {

    }

    void onLoginFinish()
    {
        Mainloop.Instance.ctrl.changeProc(ProcType.PROC_INIT);
    }
}
